﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmoLiteApi
{
    /// <summary/>
    public class Index
    {
        private string _name;
        private bool _isPrimaryKey;
        private bool _isUnique;
        private bool _isClustered;
        private bool _padIndex;
        private byte _fillFactor;
        private IndexedColumnCollection _indexedColumnCollection;

        /// <summary/>
        public Index(string name)
        {
            this._name = name;
            this._indexedColumnCollection = new IndexedColumnCollection();
        }

        /// <summary/>
        public string Name
        {
            get { return this._name; }
            set { this._name = value; }
        }

        /// <summary/>
        public bool IsPrimaryKey
        {
            get { return this._isPrimaryKey; }
            set { this._isPrimaryKey = value; }
        }

        /// <summary/>
        public virtual bool IsUnique
        {
            get { return this._isUnique; }
            set { this._isUnique = value; }
        }

        /// <summary/>
        public virtual bool IsClustered
        {
            get { return this._isClustered; }
            set { this._isClustered = value; }
        }

        /// <summary/>
        public virtual bool PadIndex
        {
            get { return this._padIndex; }
            set { this._padIndex = value; }
        }

        /// <summary/>
        public virtual byte FillFactor
        {
            get { return this._fillFactor; }
            set { this._fillFactor = value; }
        }

        /// <summary/>
        public IndexedColumnCollection IndexedColumns
        {
            get { return this._indexedColumnCollection; }
        }
    }
}
